import request from '@/utils/request'

export function getCustomerList(query) {
  return request({
    url: '/wzj/customer/list',
    method: 'post',
    params: query
  })
}

export function getCustomer(customerId) {
  return request({
    url: '/wzj/customer/get',
    method: 'get',
    params: { customerId }
  })
}

export function createCustomer(data) {
  return request({
    url: '/wzj/customer/create',
    method: 'post',
    data
  })
}

export function deleteCustomer(data) {
  return request({
    url: '/wzj/customer/del',
    method: 'post',
    data
  })
}

export function customerSelect(params) {
  return request({
    url: '/wzj/customer/select',
    method: 'get',
    params: params
  })
}

export function CreateCustomerContact(data) {
  return request({
    url: '/wzj/customer/contact/create',
    method: 'post',
    data
  })
}

export function GetCustomerContactList(customerId) {
  return request({
    url: '/wzj/customer/contact/list',
    method: 'get',
    params: { customerId }
  })
}

export function CreateCustomerEvent(data) {
  return request({
    url: '/wzj/customer/event/create',
    method: 'post',
    data
  })
}

export function GetCustomerEventList(customerId) {
  return request({
    url: '/wzj/customer/event/list',
    method: 'get',
    params: { customerId }
  })
}

export function CreateCustomerAccessory(data) {
  return request({
    url: '/wzj/customer/accessory/create',
    method: 'post',
    data
  })
}

export function GetCustomerAccessoryList(customerId) {
  return request({
    url: '/wzj/customer/accessory/list',
    method: 'get',
    params: { customerId }
  })
}
